package com.airbnb.lottie.animation.keyframe;

import com.airbnb.lottie.model.DocumentData;
import com.airbnb.lottie.value.Keyframe;

import java.util.List;

public class TextKeyframeAnimation extends KeyframeAnimation<DocumentData> {
    public TextKeyframeAnimation(List<Keyframe<DocumentData>> keyframes) {
        super(keyframes);
    }

    @Override
    DocumentData getValue(Keyframe<DocumentData> keyframe, float keyframeProgress) {
        if (keyframeProgress != 1.0f || keyframe.endValue == null) {
            return keyframe.startValue;
        } else {
            return keyframe.endValue;
        }
    }
}
